//用户档案表头
const contractTableColumn = [
  {
    label: "阶段编码",
    prop: "phaseCode",
    tooltip: true,
    width: "180",
  },
  {
    label: "阶段名称",
    prop: "phaseName",
    tooltip: true,
  },
  {
    label: "执行内容",
    prop: "phaseContent",
    tooltip: true,
    width: "400",
  },
  {
    label: "执行单据",
    prop: "bm_functionName",
    tooltip: true,
  },
  {
    label: "是否开票",
    prop: "isInvoice",
    tooltip: true,
  },
  {
    label: "确认收入",
    prop: "isIncome",
    tooltip: true,
  },
  {
    label: "启用状态",
    prop: "state",
    tooltip: true,
  },
];
// 新增 编辑表单数据
const plusDialogList = [
  {
    elCol: [
      {
        label: "阶段编码",
        prop: "phaseCode",
        tag: "elInput",
      },
      {
        label: "阶段名称",
        prop: "phaseName",
        tag: "elInput",
      },
    ],
  },
  {
    elCol: [
      {
        label: "执行内容",
        prop: "phaseContent",
        tag: "elInput",
      },
      {
        label: "执行单据",
        prop: "bm_functionName",
        tag: "elSelect",
        options: [],
      },
    ],
  },
  {
    elCol: [
      {
        label: "序号",
        prop: "sort",
        tag: "elInputNumber",
      },
      {
        label: "是否开票",
        prop: "isInvoice",
        tag: "elSwitch",
        activeValue: 1,
        inactiveValue: 0,
        inactiveText: "否",
        activeText: "是",
      },
    ],
  },
  {
    elCol: [
      {
        label: "确认收入",
        prop: "isIncome",
        tag: "elSwitch",
        activeValue: 1,
        inactiveValue: 0,
        inactiveText: "否",
        activeText: "是",
      },
      {
        label: "启用状态",
        prop: "state",
        tag: "elSwitch",
        activeValue: 1,
        inactiveValue: 0,
        inactiveText: "否",
        activeText: "是",
      },
    ],
  },
];
const rules = {
  bm_functionName: [
    {
      required: true,
      message: "请选择执行单据",
      trigger: "blur",
    },
  ],
  phaseCode: [
    {
      required: true,
      message: "请输入阶段编码",
      trigger: "blur",
    },
  ],
  phaseName: [
    {
      required: true,
      message: "请输入阶段名称",
      trigger: "blur",
    },
  ],
  sort: [
    {
      required: true,
      message: "请输入序号",
      trigger: "blur",
    },
  ],
};
// 查看
const showFormColumn = [
  {
    elCol: [
      {
        label: "阶段编码",
        prop: "phaseCode",
      },
      {
        label: "阶段名称",
        prop: "phaseName",
      },
    ],
  },
  {
    elCol: [
      {
        label: "执行内容",
        prop: "phaseContent",
      },
      {
        label: "执行单据",
        prop: "bm_functionName",
      },
    ],
  },
  {
    elCol: [
      {
        label: "序号",
        prop: "sort",
      },
      {
        label: "是否开票",
        prop: "isInvoice",
      },
    ],
  },
  {
    elCol: [
      {
        label: "确认收入",
        prop: "isIncome",
      },
      {
        label: "启用状态",
        prop: "state",
      },
    ],
  },
];
export default {
  contractTableColumn, //用户档案表头
  plusDialogList, //新增表单
  rules,
  showFormColumn,
};
